from odoo import api, fields, models


class MrpWorkorder(models.Model):
    _inherit = 'mrp.workorder'

    rma_operation_id = fields.Many2one('s.remork.bom.line')

    @api.depends('operation_id')
    def _compute_step(self):
        for i in self:
            if i.production_id.rma_id:
                i.step = i.rma_operation_id.step
            else:
                i.step = i.operation_id.step

